/*
 * Created on April 27, 2006
 *
 * Copyright (c) Patrick Armstrong 2002-2007. All Rights Reserved.
 */
package org.dime.mine.bot;

import org.dime.mine.game.Board;

/**
 * Strategy defines an interface for all components that try to solve Boards.
 * 
 * @see Board
 * 
 * @author Owner
 */
public interface Strategy
{
    // TODO change execute to return type Action so that strategies can produce
    // results asynchronously from game thread
    /**
     * Attempts to open at least one location or place at least one mark.
     * Returns true if successful.
     * 
     * @param board
     *            the Board to solve
     * @return true if execute opened or marked at least one location, false
     *         otherwise
     */
    public abstract boolean execute(Board board);

    /**
     * Attempts to open at least one location or place at least one mark, taking
     * into account the row and column hint. However, the row and column
     * parameters are not guaranteed to have an impact on the outcome of this
     * method. Returns true if successful.
     * 
     * @param board
     *            the Board to solve
     * @param row
     *            the row hint
     * @param column
     *            the column hint
     * @return true if execute opened or marked at least one location, false
     *         otherwise
     */
    public abstract boolean execute(Board board, int row, int column);
}
